package com.zhk.ScriptManagement.config;

import org.springframework.stereotype.Component;


/**
 * @Author: zhouhongkun
 * @Description: 每日清理未完成订单
 * @Date: 2021/4/9 23:03
 */
@Component
public class FinishConfig {

//    @Autowired
//    private ScriptMapper scriptMapper;
//
//    @Autowired
//    private OrderMapper orderMapper;
//
//    /**
//     * 每日24点清理未完成的订单
//     */
//    @Scheduled(cron = "0 0 24 * * ?")
//    public void finishOrder() {
//        List<Order> orders = orderMapper.selectNotFinishOrders();
//        orders.forEach(order -> {
//            long l = Duration.between(order.getCreateTime(), LocalDateTime.now()).toHours();
//            ScriptVo script = scriptMapper.getScriptByScriptId(order.getScriptId());
//
//        });
//    }
}
